package stu.sup.service;

import org.springframework.validation.BindingResult;
import stu.sup.dto.BuycarDto;
import stu.sup.dto.ProductDto;
import stu.sup.dto.UserDto;
import stu.sup.entity.Buycart;
import stu.sup.entity.Product;
import stu.sup.entity.UserLogin;

import java.util.Date;
import java.util.List;

/**
 * Created by HUAWEI on 2020/6/22.
 */
public interface IBuycarService {
    //商品添加购物车
     Buycart addProduct(Buycart buycart);
    //展示购物车商品
    BuycarDto showproduct(Integer ProductId, Integer UserId, Integer num, Double price, Date date);
    //判断该商品是否在购物车内
    boolean flagbuycar(Integer userId,Integer productId);
    //计算商品的总价
    double Allprice(Integer userId);
    //删除购物车中的商品
    void delatebuycar(Buycart buycart);
    //购物车分页
    List<Buycart> findByuser(int pageNum,int pageSize,int userloginId);
}
